/**
 * @(#)com.framework.web.wechat.controller.WeChatController
 *
 * Copyright (c) 2014-2018 一抹风光
 *
 * DESC:
 *
 */
package com.framework.web.wechat.controller;

import com.framework.core.easyui.domain.DataGridModel;
import com.framework.core.easyui.util.PageUtil;
import com.framework.web.wechat.domain.WeChatRequest;
import com.framework.web.wechat.domain.WeChatResInfo;
import com.sun.corba.se.spi.ior.ObjectKey;
import org.springframework.data.domain.PageRequest;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 微信接口测试类
 *
 * @author fusf
 * @version 1.0  2016/9/6
 */
@RestController
public class WeChatController {

    @RequestMapping(value = "/goods/goodsDetail", method = RequestMethod.GET)
    @ResponseBody
    public Object getGoodlist(WeChatRequest requestInfo, HttpServletRequest request) throws Exception {
        WeChatResInfo resInfo = new WeChatResInfo();
        Map<String, Object> map = new HashMap<>();
        map.put("title", "五两以上大闸蟹");
        map.put("description", "五两以上大闸蟹需要提前10天订购");
        map.put("goodsId", 99);
        map.put("image", "/file/image.html");
        map.put("price", 568);
        map.put("preferentical", 518);
        map.put("freightPrice", 0);
        map.put("shopName", "蟹皇堡");
        map.put("shopDescription", "正宗的阳澄湖大闸蟹");
        map.put("buynumber", "99");
        List<String> list = new ArrayList<String>();
        list.add("138*****764");
        list.add("138*****765");
        list.add("138*****766");
        map.put("buyPhone", list);
        resInfo.setResult(map);
        return resInfo;

    }

}
